<?php
namespace Home\Model;
use Think\Model;
class ApplicationApprovalModel extends Model {
/*	protected $_validate = array(
     array('name','','物品名字已存在！',self::MUST_VALIDATE, 'unique'  ,self::MODEL_INSERT), //添加时 
     array('name','','物品名字已存在！',self::MUST_VALIDATE, 'unique'  ,self::MODEL_UPDATE), //编辑时验证唯一性
   );*/
	//物品所属分类
	 protected $paymentMethodList = array(
           "1"=>"现金",
           "2"=>"刷卡", 
           "3"=>"支付宝",
           "4"=>"微信"
      );
	   protected $paymentMethodType = array(
          array("id"=>"1","name"=>"现金"),
          array("id"=>"2","name"=>"刷卡"),
          array("id"=>"3","name"=>"支付宝"),
          array("id"=>"4","name"=>"微信")
      );
	//物品属性
	 protected $propertyList = array(
           "1"=>"固有类",
           "2"=>"消耗类"
      );
	protected $propertyType = array(
          array("id"=>"1","name"=>"固有类"),
          array("id"=>"2","name"=>"消耗类")
      );
    //审批状态
     protected $statusList = array(
           "待审批",
           "审批通过",
           "审批不通过"
      );
     protected $statusType = array(
          array("id"=>"1","name"=>"审批通过"),
          array("id"=>"2","name"=>"审批不通过")
      );
      //申请类别
   protected $applicationTypeList = array(
           "1"=>"采购申请",
           "2"=>"报修申请",
           "3"=>"报废申请"
      );
  protected $applicationTypeType = array(
          array("id"=>"1","name"=>"采购申请"),
          array("id"=>"2","name"=>"报修申请"),
          array("id"=>"3","name"=>"报废申请")
      );



	   /**
    * 返回物品种类的汉字(一维)
    * @return string|array
    */
    public function getPaymentMethodList($index){
      if (is_int($index)) {
        return $this->paymentMethodList[$index];
      } else {
        return $this->paymentMethodList;
      }
    }
	   /**
    * 返回物品种类(二维)
    * @return string|array
    */
    public function getPaymentMethodType(){
        return $this->paymentMethodType;
    }
    /**
    * 返回物品属性的汉字(一维)
    * @return string|array
    */
    public function getPropertyList($index){
      if (is_int($index)) {
        return $this->propertyList[$index];
      } else {
        return $this->propertyList;
      }
    }
    /**
    * 返回物品种类(二维)
    * @return string|array
    */
    public function getPropertyType(){
        return $this->PropertyType;
    }

     /**
    * 返回审批状态的汉字(一维)
    * @return string|array
    */
    public function getStatusList($index){
      if (is_int($index)) {
        return $this->statusList[$index];
      } else {
        return $this->statusList;
      }
    }
     /**
    * 返回审批状态(二维)
    * @return string|array
    */
    public function getStatusType(){
        return $this->statusType;
    }
         /**
    * 返回申请类别的汉字(一维)
    * @return string|array
    */
    public function getApplicationTypeList($index){
      if (is_int($index)) {
        return $this->applicationTypeList[$index];
      } else {
        return $this->applicationTypeList;
      }
    }
     /**
    * 返回审批状态(二维)
    * @return string|array
    */
    public function getApplicationTypeType(){
        return $this->applicationTypeType;
    }



    

   



 




}